package com.example.travel.domain;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName messages
 */
public class Messages extends Message implements Serializable {
    /**
     *
     */
    private Integer messageId;

    /**
     *
     */
    private String fromUser;

    /**
     *
     */
    private String toUser;

    /**
     *
     */
    private String messageContent;

    /**
     *
     */
    private Date sendTime;

    /**
     *
     */
    private Object status;

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Integer getMessageId() {
        return messageId;
    }

    /**
     *
     */
    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }

    /**
     *
     */
    public String getFromUser() {
        return fromUser;
    }

    /**
     *
     */
    public void setFromUser(String fromUser) {
        this.fromUser = fromUser;
    }

    /**
     *
     */
    public String getToUser() {
        return toUser;
    }

    /**
     *
     */
    public void setToUser(String toUser) {
        this.toUser = toUser;
    }

    /**
     *
     */
    public String getMessageContent() {
        return messageContent;
    }

    /**
     *
     */
    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    /**
     *
     */
    public Date getSendTime() {
        return sendTime;
    }

    /**
     *
     */
    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    /**
     *
     */
    public Object getStatus() {
        return status;
    }

    /**
     *
     */
    public void setStatus(Object status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Messages other = (Messages) that;
        return (this.getMessageId() == null ? other.getMessageId() == null : this.getMessageId().equals(other.getMessageId()))
                && (this.getFromUser() == null ? other.getFromUser() == null : this.getFromUser().equals(other.getFromUser()))
                && (this.getToUser() == null ? other.getToUser() == null : this.getToUser().equals(other.getToUser()))
                && (this.getMessageContent() == null ? other.getMessageContent() == null : this.getMessageContent().equals(other.getMessageContent()))
                && (this.getSendTime() == null ? other.getSendTime() == null : this.getSendTime().equals(other.getSendTime()))
                && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMessageId() == null) ? 0 : getMessageId().hashCode());
        result = prime * result + ((getFromUser() == null) ? 0 : getFromUser().hashCode());
        result = prime * result + ((getToUser() == null) ? 0 : getToUser().hashCode());
        result = prime * result + ((getMessageContent() == null) ? 0 : getMessageContent().hashCode());
        result = prime * result + ((getSendTime() == null) ? 0 : getSendTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", messageId=").append(messageId);
        sb.append(", fromUser=").append(fromUser);
        sb.append(", toUser=").append(toUser);
        sb.append(", messageContent=").append(messageContent);
        sb.append(", sendTime=").append(sendTime);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}